<div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
            <a class="brand" href="<?=base_url()?>">CMS <span class="goProLabel">PRO</span></a>
            <div class="nav-collapse">
                <ul class="nav">
                    <li class="dropdown <? if($_GET['post_type']=='page') echo 'active';?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Pages
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?=base_url('posts/view_all?post_type=page')?>"><i class="icon-list-alt"></i> View All Pages</a> </li>
                            <li><a href="<?=base_url('posts/view_new?post_type=page')?>"><i class="icon-pencil"></i> Add Page</a> </li>
                        </ul>
                    </li>
                    <li class="divider-vertical"></li>                                                                            
                    <li class="dropdown <? if($_GET['post_type']=='news') echo 'active';?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Lates News
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?=base_url('posts/view_all?post_type=news')?>"><i class="icon-list-alt"></i> View All News</a> </li>
                            <li><a href="<?=base_url('posts/view_new?post_type=news')?>"><i class="icon-pencil"></i> Add News</a> </li>
                        </ul>
                    </li> 
                    <li class="divider-vertical"></li>
                    <li class="dropdown <? if($page=='Gallery') echo 'active';?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Galleries
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?=base_url('albums/view_new?post_type=gallery')?>"><i class="icon-picture"></i> Add Gallery / Images or Video</a> </li>                                  
                            <li><a href="<?=base_url('albums/view_all?post_type=gallery&type=all')?>"><i class="icon-camera"></i> View All Galleries</a> </li>
                            <li class="divider"></li>
                            <li class="nav-header">Gallery Type</li>
                            <li class="divider"></li>                                                               
                            <li><a href="<?=base_url('albums/view_all?post_type=gallery&type=page')?>"><i class="icon-camera"></i> View All :: Pages galleries</a> </li>
                            <li><a href="<?=base_url('albums/view_all?post_type=gallery&type=news')?>"><i class="icon-camera"></i> View All :: News galleries</a> </li>
                        </ul>
                    </li>
                    <li class="divider-vertical"></li>
                    <li class="dropdown <? if($page=='Document') echo 'active';?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Documents
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?=base_url('documents/view_new?post_type=document')?>"><i class="icon-picture"></i> Add Folder / Files</a> </li>                                  
                            <li><a href="<?=base_url('documents/view_all?post_type=document&type=all')?>"><i class="icon-camera"></i> View All Folders</a> </li>
                        </ul>
                    </li>
                    <li class="divider-vertical"></li>
                    <li class="dropdown <? if($page=='Realestate') echo 'active';?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Realestate
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?=base_url('objects/view_new?post_type=realestate')?>"> Add Object</a> </li>                                  
                            <li><a href="<?=base_url('objects/view_all?post_type=realestate')?>">View All Objects</a> </li>
                            <li class="divider"></li>
                            <li><a href="<?=base_url('attributes/view_all?post_type=realestate')?>">Attributes</a> </li>
                        </ul>
                    </li>
                    <li class="divider-vertical"></li>
                    <li class="dropdown <? if($page=='Maillist') echo 'active';?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Other
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?=base_url('mail_list/view_all?post_type=mail_list')?>"><i class="icon-list-alt"></i>  Mail list</a> </li>
                        </ul>
                    </li>
                    <li class="divider-vertical"></li>
                    <li class="dropdown <? if($page=='Thumbnails' || $page=='Words') echo 'active';?>">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            Settings
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="nav-header">Words</li>
                            <li class="divider"></li> 
                            <li><a href="<?=base_url('cmssettings/view_all_words?post_type=words')?>"><i class="icon-list-alt"></i> View All Words</a> </li>                                  
                            <li><a href="<?=base_url('cmssettings/view_new_word?post_type=words')?>"><i class="icon-pencil"></i> Add Word</a> </li>                                  
                            <li class="divider"></li> 
                            <li class="nav-header">Thumbnails</li>
                            <li class="divider"></li> 
                            <li><a href="<?=base_url('cmssettings/view_all_thimbnail_size?post_type=thumbnails')?>"><i class="icon-list-alt"></i> View All Thumbnails</a> </li>
                            <li><a href="<?=base_url('cmssettings/view_add_thimbnail_size?post_type=thumbnails')?>"><i class="icon-pencil"></i> Add Thumbnail</a> </li>
                            <li class="divider"></li>
                            <li><a href="<?=base_url('object_gallery/regenerate_thumbnails?post_type=thumbnails')?>"><i class="icon-list-alt"></i> Realestate thumbnails again</a> </li> 
                        </ul>
                    </li>
                </ul> 
                <!--<form action="" class="navbar-search pull-left">
                <input type="text" placeholder="Search" class="search-query span2">
                </form>-->
                <ul class="nav pull-right">
                    <!--<li><a href="#">Help</a></li>-->
                    <li class="divider-vertical"></li>
                    <li class="dropdown">
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">User <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <!--<li><a href="#">Change password</a></li>
                            <li class="divider"></li> -->
                            <li><a href="<?=base_url('login/logout');?>">Logout</a></li>
                        </ul>
                    </li>
                </ul> 

                <ul class="nav pull-right clearfix" id="flags">

                    <? foreach(config_item('wp_languages') as $key=>$value): ?>        
                        <li><a href="javascript:" rel="<?=$key?>"><img src="<?=base_url();?>assets/flags/<?=$key?>.png" alt="<?=$value?>" title="<?=$value?>" /></a></li>
                        <? endforeach; ?> 


                </ul>
            </div>
        </div><!--/.nav-collapse -->
    </div>
    </div>
</div> <!-- /navbar -->